package com.suineg.pms.service.base;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suineg.pms.entity.base.HouseOwner;
import com.suineg.pms.repository.base.HouseOwnerDao;

/**
 * 业主管理 
 *@author Suine
 */
@Service
@Transactional
public class HouseOwnerService {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private HouseOwnerDao dao;
	
	public HouseOwner get(Long id){
		return dao.findOne(id);
	}
	
	public void save(HouseOwner houseOwner){
		dao.save(houseOwner);
	}
	
	public void delete(Long id){
		dao.delete(id);
	}
	
	/**
	 * 根据证件号码获取业主信息
	 * @param idNo
	 * @return
	 */
	public HouseOwner findByIdNo(String idNo){
		return dao.findByIdNo(idNo);
	}

}

